h1,h2,h3,h4,h5,h6,p{
  font-size: 100%;
  margin: 0;
  padding: 0;
  font-weight: normal;
}

html{
  height: 100%;
  font-size: 14px;
}
body{
  animation: bgBefore 18s linear infinite;
  background: #0a4682 url("/images/bg-before.png") 0 0;
  background-size: 220px 214px;
  color: #000;
  height: 100%;
  overflow: hidden;
  margin: 0;
  font-family: PingFang, -apple-system, BlinkMacSystemFont, Roboto, Helvetica Neue, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  @keyframes bgBefore{
    to{ background-position: 220px 214px; }
  }
}
#root{
  animation: bgAfter 28s linear infinite;
  background: url("/images/bg-after.png") 0 0;
  background-size: 320px 310.5px;
  perspective: 800px;
  overflow-x: hidden;
  overflow-y: auto;
  position: relative;
  min-height: 100%;
  @keyframes bgAfter{
    to{ background-position: -320px -310.5px; }
  }
}
.card{
  border: 1px solid #000;
  box-shadow: 0 0 10px rgba(255,255,255,75);
  width: 345px;
  height: 504px;
  position: absolute;
  left: 8rem;
  top: 6rem;
  transition: transform .4s;
  transform-style: preserve-3d;

  @media (max-width: 640px) {
    left: 1rem;
    top: 4rem;
  }

  &.positive{
    transform: none;
  }
  &.negative{
    transform: rotateY(-180deg);
  }
  &.flat{
    transform: rotateY(0deg) rotateX(70deg);
    .photo{
      opacity: 0;
    }
    .image{
      transform: rotateX(-70deg) translate(-50%, -50%);
      display: block;
    }
  }
  .body, .back{
    background: 0 0 no-repeat;
    background-size: 100%;
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
  }
  .body{
    background-image: url("/images/body.jpg");
  }
  .back{
    background-image: url("/images/background-default.jpg");
    transform: rotateY(-180deg) translateZ(1px);
    position: relative;
    overflow: hidden;
    &::after{
      animation: backBlink 2s infinite;
      background-color: #fff;
      content: "";
      width: 200%;
      height: 100px;
      opacity: .17;
      position: absolute;
      left: -50%;
      top: 0;
      transform: rotate(-37deg);
      transform-origin: left top;
    }
    @keyframes backBlink{
      to{ top: 200%; }
    }
  }

  h1{
    text-align: left;
    color: #111;
    text-shadow: 1px 1px rgba(255,255,255,.75);
    font-size: 1.8rem;
    width: 284px;
    margin: 20px auto 0;
    &::after{
      content: "";
      clear: both;
      display: table;
    }
    .attribute{
      height: 35px;
      width: 35px;
      background: url("/images/frame.png") 0 0 no-repeat;
      background-size: 200%;
      float: right;
      margin-top: 3px;
    }
  }
  h2{
    color: #333;
    text-align: right;
    font-size: 1.2rem;
    width: 272px;
    margin: 0 auto 6px;
    min-height: 21px;
    .level{
      height: 21px;
      width: 21px;
      background: url("/images/frame.png") 100% -147px no-repeat;
      background-size: 200%;
      display: inline-block;
      vertical-align: middle;
      margin-left: 1px;
    }
  }

  .photo{
    display: block;
    height: 264px;
    width: 262px;
    margin: 0 auto;
  }

  .mode{
    background: url("/images/frame.png") 0 0 no-repeat;
    background-size: 200%;
    display: inline-block;
    vertical-align: middle;
  }
  .descriptions{
    font-size: .8rem;
    width: 280px;
    height: 90px;
    position: relative;
    margin: 24px auto 10px;
    .monster{
      border-top: 1px solid #333;
      text-align: right;
      padding: 2px 0 0;
      position: absolute;
      bottom: 0;
      left: 0;
      width: 100%;
      line-height: normal;
      > span{
        display: inline-block;
        vertical-align: middle;
        margin-left: 8px;
      }
      .tag{
        font-weight: bold;
        margin-right: 4px;
      }
    }
  }

  footer{
    font-size: .8rem;
    position: absolute;
    left: 13px;
    bottom: 10px;
  }
  .passcode{
    vertical-align: top;
  }

  .image{
    animation: imageFloat 2s linear infinite alternate;
    display: none;
    width: 300px;
    position: absolute;
    left: 50%;
    top: 0;
    transition: transform .4s;
    @keyframes imageFloat{
      from{ top: -25px; }
      to{ top: 25px; }
    }
  }

}
